# BuyChickenSolution
count, rooster, hen, chick = 0, 0, 0, 0
for rooster in range(0, 101):
    for hen in range(0, 101):
        chick = 100 - rooster - hen
        # 计算鸡的个数是否合法
        if chick >= 0 and chick % 3 == 0:
            # 计算总价钱是否满足要求
            if 5 * rooster + 3 * hen + chick // 3 == 100:
                # 得到一个满足条件的解，统计并输出
                count += 1
                print('解', count, ': 公鸡', rooster, '只 母鸡', hen, '只 小鸡', chick, '只')
print('总共有', count, '个问题解')
